package com.yzf.demo.demo.annotation.ioc;

import com.yzf.demo.demo.annotation.anno.DemoBeanAnnotation;
import com.yzf.demo.demo.annotation.anno.DemoComponentAnnotation;

/**
 * Created by 于占峰 on 2020/3/28/028.
 */
@DemoComponentAnnotation
public class DemoBeanA {

    public DemoBeanA() {
        System.out.println("DemoBeanA构造器初始化");
    }

    @DemoBeanAnnotation("DemoBeanB")
    public static DemoBeanB cerateB() {
        System.out.println("调用cerateB实例化实体类B....");
        return new DemoBeanB();
    }

    @DemoBeanAnnotation("DemoBeanC")
    public DemoBeanC cerateC() {
        System.out.println("调用cerateC实例化实体类c....");
        return new DemoBeanC();
    }
}
